// default package
// Generated 23-mar-2015 17:46:53 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * CrsPerfilCentro generated by hbm2java
 */
@Entity
@Table(name = "crs_perfil_centro", schema = "public")
public class CrsPerfilCentro implements java.io.Serializable {

	private int centroid;
	private Users users;
	private CrsPerfilComercial crsPerfilComercial;
	private CrsPerfilCentro crsPerfilCentro;
	private Set crsPerfilCentros = new HashSet(0);
	private Set crsCobroses = new HashSet(0);
	private Set crsPermisoInfos = new HashSet(0);
	private Set crsPerfilEmpleados = new HashSet(0);

	public CrsPerfilCentro() {
	}

	public CrsPerfilCentro(Users users) {
		this.users = users;
	}

	public CrsPerfilCentro(Users users, CrsPerfilComercial crsPerfilComercial,
			CrsPerfilCentro crsPerfilCentro, Set crsPerfilCentros,
			Set crsCobroses, Set crsPermisoInfos, Set crsPerfilEmpleados) {
		this.users = users;
		this.crsPerfilComercial = crsPerfilComercial;
		this.crsPerfilCentro = crsPerfilCentro;
		this.crsPerfilCentros = crsPerfilCentros;
		this.crsCobroses = crsCobroses;
		this.crsPermisoInfos = crsPermisoInfos;
		this.crsPerfilEmpleados = crsPerfilEmpleados;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "users"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "centroid", unique = true, nullable = false)
	public int getCentroid() {
		return this.centroid;
	}

	public void setCentroid(int centroid) {
		this.centroid = centroid;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "comercialid")
	public CrsPerfilComercial getCrsPerfilComercial() {
		return this.crsPerfilComercial;
	}

	public void setCrsPerfilComercial(CrsPerfilComercial crsPerfilComercial) {
		this.crsPerfilComercial = crsPerfilComercial;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "centrogestorid")
	public CrsPerfilCentro getCrsPerfilCentro() {
		return this.crsPerfilCentro;
	}

	public void setCrsPerfilCentro(CrsPerfilCentro crsPerfilCentro) {
		this.crsPerfilCentro = crsPerfilCentro;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "crsPerfilCentro")
	public Set getCrsPerfilCentros() {
		return this.crsPerfilCentros;
	}

	public void setCrsPerfilCentros(Set crsPerfilCentros) {
		this.crsPerfilCentros = crsPerfilCentros;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "crsPerfilCentro")
	public Set getCrsCobroses() {
		return this.crsCobroses;
	}

	public void setCrsCobroses(Set crsCobroses) {
		this.crsCobroses = crsCobroses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "crsPerfilCentro")
	public Set getCrsPermisoInfos() {
		return this.crsPermisoInfos;
	}

	public void setCrsPermisoInfos(Set crsPermisoInfos) {
		this.crsPermisoInfos = crsPermisoInfos;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "crsPerfilCentro")
	public Set getCrsPerfilEmpleados() {
		return this.crsPerfilEmpleados;
	}

	public void setCrsPerfilEmpleados(Set crsPerfilEmpleados) {
		this.crsPerfilEmpleados = crsPerfilEmpleados;
	}

}
